
public class Transformations {
	public static void octaveDisp(Integer[] pitches, int chord)
	{

	}
	@SuppressWarnings("null")
	public static int[] makeScale(int key, int scaleType)
	{
		int[] scale=null;
		for (int i=0;i<Constants.scales[scaleType].length;i++)
		{
			scale[i]=(Constants.scales[scaleType][i]+key)%12;
		}
		return scale;
	}
	public static int[] makeScaleMajorMinor(int key, boolean keyMajor)
	{
		int[] scale=new int[Constants.scales[Constants.ionian].length];
		if (keyMajor)
			for (int i=0;i<Constants.scales[Constants.ionian].length;i++)
			{
				scale[i]=(Constants.scales[Constants.ionian][i]+key)%12;
			}
		else
		{
			for (int i=0;i<Constants.scales[Constants.aeolian].length;i++)
			{
				scale[i]=(Constants.scales[Constants.aeolian][i]+key)%12;
			}
		}
		return scale;
	}
	public static boolean noteInScale(int pitch, int[] scale) // is a certain note in the current key / scale
	{
		boolean inScale = false;
		for (int i=0;i<scale.length;i++)
		{
			if (pitch%12==scale[i])
			{
				inScale=true;
			}
		}
		
		return inScale;
	}
	
	public static boolean noteInScaleIndex(int pitch, int[] scale) // is a certain note in the current key / scale
	{
		boolean inScale = false;
		@SuppressWarnings("unused")
		int index=0;
		for (int i=0;i<scale.length;i++)
		{
			if (pitch%12==scale[i])
			{
				inScale=true;
				index=i;
			}
			if (!inScale&&scale[i]==pitch%12+1)
			{
				
			}
		}
		
		return inScale;
	}
}
